package cn.findviewbydream.evil.main.controller

import cn.findviewbydream.evil.main.entity.TestEntity
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.ResponseBody

/********************************************
 * 工程名：MealOrder
 * 包名：cn.findviewbydream.evil.main.controller
 * 时间：16-12-27
 * 作者：白雨濃 evil
 * 邮箱：evilbai@foxmail.com
 * 内容：
 ********************************************/
@Controller
class TestController
{
    @RequestMapping("/test")
    @ResponseBody
    fun index(): List<TestEntity>
    {
        val list = (1..10).map { TestEntity("name:$it", it + 10) }
        println(list.toString())
        return list
    }

    @RequestMapping("/socket")
    fun socket(): String = "test"

    @RequestMapping("/ttt")
    fun ttt(): String = "ttt"
}